package 力扣日常刷题.木22一月.第02天0109;

/**
 * @author 帅小伙
 * @date 2022/1/9
 * @description
 */
public class Demo02数组简单string中单词数 {


    public int mostWordsFound(String[] sentences) {
        int max = 0;
        for (String sentence : sentences) {
            if (max < sentence.split(" ").length) {
                max = sentence.split(" ").length;
            }
        }
        return max;
    }
}
